#ifndef CHATWINDOW_H
#define CHATWINDOW_H

#include <QMainWindow>
#include <QTcpServer>
#include <QTcpSocket>
#include <QListWidgetItem>


namespace Ui {
class chatWindow;
}

class chatWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit chatWindow(QWidget *parent = nullptr);
    ~chatWindow();
    bool eventFilter(QObject *watched, QEvent *event)override;
    void callKeyBoard();

private slots:
    void on_listenButton_clicked();

    void on_clearButton_clicked();

    void on_sendButton_clicked();

    void read_data();

    void new_client();

    void on_minButton_clicked();

private:
    Ui::chatWindow *ui;
    QTcpSocket *socket;
    QTcpServer *server;
};

#endif // CHATWINDOW_H
